<!DOCTYPE html>
<html>
    {include file="Widgets/head" /}
    <body class="gray-bg">
        <div class="wrapper wrapper-content animated fadeInUp">
            <div class="row">
                <div class="col-sm-12">
                    <div class="ibox">
                        <div class="ibox-title">
                            <h3>资金明细列表</h3>
                        </div>
                        <div class="ibox-content">
                            <form action="" method="get" class="form-horizontal"> 
                                <div class="form-group">
                                    <label class="col-sm-1 control-label" style="text-align:center;" for="category">操作：</label>
                                    <div class="col-sm-2 m-b-xs">
                                        <select id="category" name="category" class="form-control input-s-sm inline">
                                            <option value="0" {if($category == 0)} selected {/if}>全部</option>
                                            {foreach $category_list as $key => $val} 
                                            <option value="{$key}" {if($key == $category)} selected {/if}>{$val}</option>
                                            {/foreach}
                                        </select>
                                    </div>
                                    <label class="col-sm-1 control-label" style="text-align:center;" for="status">状态：</label>
                                    <div class="col-sm-2 m-b-xs">
                                        <select id="status" name="status" class="form-control input-s-sm inline">
                                            <option value="0" {if($status == 0)} selected {/if}>全部</option>
                                            {foreach $status_list as $key => $val} 
                                            <option value="{$key}" {if($key == $status)} selected {/if}>{$val}</option>
                                            {/foreach}
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="pull-left control-label col-sm-1" style="text-align:center;" for="start_time">操作时间:</label>
                                    <div class="col-sm-2">
                                        <input type="date" id="start_time" name="start_time" class="form-control laydate-icon layer-date" value="{$start_time}">
                                    </div>
                                    <label class="pull-left control-label col-sm-1" style="text-align:center;" for="end_time">——</label>
                                    <div class="col-sm-2">
                                        <input type="date" id="end_time" name="end_time" class="form-control laydate-icon layer-date" value="{$end_time}">
                                    </div>
                                    <div class="col-sm-1 m-b-xs">
                                        <button class="btn btn-primary" type="submit">查找</button>
                                    </div>
                                </div>
                            </form>
                            <table class="table table-bordered table-hover">
                                <thead>
                                    <tr>
                                        <th>流水号</th>
                                        <th>类目</th>
                                        <th>操作</th>
                                        <th>金额（元）</th>
                                        <th>状态 </th>
                                        <th>操作时间</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {if ($list)}
                                        {foreach $list as $value} 
                                        <tr class="gradeA odd">
                                            <td>{$value.trx_id}</td>
                                            <td>{$value.remark}</td>
                                            <td>{$value.category}</td>
                                            <td>{$value.affect_money}</td>
                                            <td>{$value.status}</td>
                                            <td>{:date('Y-m-d H:i:s',$value.add_time)}</td>
                                        </tr>
                                        {/foreach}                            
                                    {else /}
                                        <tr class="gradeA odd">
                                            <td style="text-align:center;" colspan="6">没有找到符合条件的记录</td>
                                        </tr>
                                    {/if}
                                </tbody>
                            </table>
                            {//分页}
                            <div>
                                <div class="row">
                                    {$paginator}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </body>
</html>
